begintownscript;

variables;
short bmessage,pcs;
string custom_m;

body;

beginstate INIT_STATE;
	turn_off_training(1);

	if(get_flag(58,0) > 0){
		activate_hidden_group(1);
		if(get_flag(59,0) == 1)
			erase_char(23);
		if(get_flag(60,0) == 1)
			erase_char(24);
		if(get_flag(61,0) == 1)
			erase_char(22);
		if(get_flag(62,0) == 1)
			erase_char(21);
	}

	if(get_flag(63,0) == 0){
		reset_dialog();
		add_dialog_str(0,"What a piece of crap.  This in *no way* can be the true lair of the brigands.",0);
		add_dialog_str(1,"It's barely floored in wood, most of it being dirt.  There are no walls, merely wooden braces holding up the passageways in the ground.  The ceiling is low, and is held up with wooden columns.",0);
		add_dialog_str(2,"Plus, there's hardly enough room here to house the brigand armies that have been waltzing all over the place.  There's not nearly enough activity here to justify such a powerful brigand presence.",0);
		add_dialog_str(3,"This is not the brigands' main stronghold.  It is, however, a well-staffed base, and maybe even a waystation.  There are still some brigands here, and a large number at that.",0);
		add_dialog_choice(0,"And the only good brigand is a dead one.");
		bmessage = run_dialog(1);
		set_flag(63,0,1);
	}

break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

	if(get_flag(58,0) == 0){
		pcs = 0;
		while((pcs <= 3) && (get_flag(58,0) == 0)){
			if(char_loc_y(pcs) <= 22){
				set_flag(58,0,1);
				activate_hidden_group(1);
			}
			pcs = (pcs + 1);
		}
	}

break;

beginstate 10;

	if(get_flag(77,0) == 0){
		message_dialog("The office here is bare.  There are bookshelves and a pedestal for a book, but everything has been removed.  Whatever purpose this office served a long time ago, it does so no longer.","A sign to the left says that a man named _Commander Andre_ has been relocated-- but who is he, and where is he now?");
		set_flag(77,0,1);
	}

break;

beginstate 11;

	if(party_size() == 1)
		message_dialog("There is a rune on the floor here.  When I try stepping past it, it sends a gust that pushes my feet off of the floor and me back a step or two.  None of my weapons can reach the rune to scratch it out, and it appears to be flame-retardant.","Whatever this rune is protecting, protected it will remain.");
	if(party_size() > 1)
		message_dialog("There is a rune on the floor here.  When we try stepping past it, it sends a gust that pushes our feet off of the floor and us back a step or two.  None of our weapons can reach the rune to scratch it out, and it appears to be flame-retardant.","Whatever this rune is protecting, protected it will remain.");
	block_entry(1);

break;

beginstate 12;

	if(get_flag(78,0) == 0){
		if(party_size() == 1)
			message_dialog("There is an exit to the lair here, but it a sheer cliff.  Meaning, if I were to leap down from here, I'd be able to leave.  On the other hand, I would not be able to return the same way.","The brigands may have it to escape in a time of dire need.  It's not visible or accessible from the outside, making it the perfect way to evade an enemy coming in from the front.");
		if(party_size() > 1)
			message_dialog("There is an exit to the lair here, but it a sheer cliff.  Meaning, if we were to leap down from here, we'd be able to leave.  On the other hand, we would not be able to return the same way.","The brigands may have it to escape in a time of dire need.  It's not visible or accessible from the outside, making it the perfect way to evade an enemy coming in from the front.");
		set_flag(78,0,1);
	}

break;

